<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Acesso\Form;

use Zend\Form\Form as Form;

/**
 * Description of Login
 *
 * @author renato
 */
class Login extends Form
{

    public function __construct( $name = null )
    {
        parent::__construct( 'frmLogin' );
        $this->setAttribute( 'method', 'post' );
        $this->setAttribute( 'role', 'form' );
        $this->add( array(
            'name'       => 'usuario',
            'attributes' => array(
                'type'  => 'text',
                'id'    => 'usuario',
                'class' => 'form-control required'
            ),
            'options'    => array(
                'label' => 'Usuário',
            ),
        ) );
        $this->add( array(
            'name'       => 'senha',
            'attributes' => array(
                'type'  => 'password',
                'id'    => 'password',
                'class' => 'form-control required'
            ),
            'options'    => array(
                'label' => 'Senha',
            ),
        ) );
        $this->add( array(
            'name'       => 'logar',
            'attributes' => array(
                'type'  => 'button',
                'value' => 'Logar',
                'id'    => 'logar',
                'class' => 'btn btn-default'
            ),
        ) );

    }

}
